const db = uniCloud.database()
exports.main = async (event) => {
  try {
    const res = await db.collection('bull_culture_history')
      .aggregate()
      .sample({ size: 1 })
      .end()
      
    return {
      code: 200,
      data: res.data[0] || null
    }
  } catch (e) {
    return {
      code: 500,
      message: '文化数据获取失败'
    }
  }
}